package cn.ms.springbootimagedemo.Controller;

import cn.ms.springbootimagedemo.Utils.ImageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/image")
public class ImageController {

    @Autowired
    ImageUtils imageUtils;

    @RequestMapping("/getPaImageByQQ/{qq}")
    public void getPaImageByQQ(HttpServletResponse response, @PathVariable Long qq){
        imageUtils.renderImage(response,qq);
    }

}
